package com.example.survey_determination.service.impl;


import com.example.survey_determination.dao.ObjectDamageInfoDao;
import com.example.survey_determination.service.ObjectDamageInfoService;
import entity.object_damage_info;
import org.springframework.stereotype.Service;


import javax.annotation.Resource;

/**
 * (ObjectDamageInfo)表服务实现类
 *
 * @author makejava
 * @since 2022-01-11 00:00:03
 */
@Service("objectDamageInfoService")
public class ObjectDamageInfoServiceImpl implements ObjectDamageInfoService {
    @Resource
    private ObjectDamageInfoDao objectDamageInfoDao;

    /**
     * 通过ID查询单条数据
     *
     * @return 实例对象
     */
    @Override
    public object_damage_info queryById(String claimMainId) {
        return this.objectDamageInfoDao.queryById(claimMainId);
    }

    @Override
    public object_damage_info selectAll() {
        return objectDamageInfoDao.selectAll();
    }

    @Override
    public int insert(object_damage_info object_damage_info) {
        return this.objectDamageInfoDao.insert(object_damage_info);
    }


    /**
     * 通过主键删除数据
     *
     * @param objectdamage 主键
     * @return 是否成功
     */
    @Override
    public boolean deleteById(Integer objectdamage) {
        return this.objectDamageInfoDao.deleteById(objectdamage) > 0;
    }
}
